const {
  $util,
} = getApp();
Page({
  data: {},
  onLoad(ops) {
    this.loadDetail();
    wx.setNavigationBarTitle({
      title: ops.barTitle && decodeURIComponent(ops.barTitle) || '资料中心',
    });
  },
  loadDetail() {
    $util.request({
      url: 'entry/wxapp/edu.databank.main',
      data: {},
      success: (res) => {
        this.setData({
          books: res.books,
          recommend: res.data,
          loaded: true,
        });
      },
    });
  },
  onShareAppMessage() {
    let _this = this;
    let path = '/ws_party_const/pages/education/train/network/database/index';
    let res = {
      path,
    };
    return res;
  },
});
